/**
 * 
 */
package com.sztx.pay.center.core.service.bean;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;


/**
 * @author Administrator
 * 
 */
@SuppressWarnings("serial")
public class CreateActReq implements java.io.Serializable {
    private String userId;
    private int actType;
    private String userRemark;
    private String innerRemark;

    public CreateActReq(String userId, int actType,
            String userRemark, String innerRemark) {
        super();
        this.userId = userId;
        this.actType = actType;
        this.userRemark = userRemark;
        this.innerRemark = innerRemark;
    }

    public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

    public int getActType() {
        return actType;
    }

    public void setActType(int actType) {
        this.actType = actType;
    }

    public String getUserRemark() {
        return userRemark;
    }

    public void setUserRemark(String userRemark) {
        this.userRemark = userRemark;
    }

    public String getInnerRemark() {
        return innerRemark;
    }

    public void setInnerRemark(String innerRemark) {
        this.innerRemark = innerRemark;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + actType;
		result = prime * result + ((userId == null) ? 0 : userId.hashCode());
		return result;
	}

	
	public int getJvmAddress(){
		return super.hashCode();
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CreateActReq other = (CreateActReq) obj;
		if (actType != other.actType)
			return false;
		if (userId == null) {
			if (other.userId != null)
				return false;
		} else if (!userId.equals(other.userId))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "CreateActReq [userId=" + userId + ", actType=" + actType
				+ ", userRemark=" + userRemark + ", innerRemark=" + innerRemark
				+ "]";
	}

    
	
	public static void main(String[] args) {
		CreateActReq req1 = new CreateActReq("123", 1, "f", "d");
		CreateActReq req2 = new CreateActReq("123", 1, "d", "f");
		
		
		System.out.println(req1.equals(req2));
		
		List<CreateActReq> list = new ArrayList<CreateActReq>();
		list.add(req1);
		list.add(req2);
		
		System.out.println(list);
		
		list.remove(req1);
		
		System.out.println(list);
		
		Set<CreateActReq> set = new HashSet<CreateActReq>();
		set.add(req1);
		set.add(req2);
		System.out.println(set);
		
		set.remove(req2);
		
		System.out.println(set);
		
		System.out.println(req1.hashCode());
		System.out.println(req2.hashCode());
		
		System.out.println(req1 == req2);
		
	}
	
	
	
	
   

}
